package me.xiaoyan.cloud.service;

import me.xiaoyan.cloud.pojo.UserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@Service
// 设置要访问提供者的名称
@FeignClient("user-login-service-provider")
public interface UserLoginService {
    // 当需要使用feign传递多个参数时，要使用requestParam指定每个参数的名称，即使名称一致
    @PostMapping("/login")
    public UserInfo login(@RequestBody UserInfo userInfo);

    @PostMapping("/signup")
    public UserInfo signup(@RequestBody UserInfo userInfo);
}
